/**
 * 
 */
package specialtriggers;

import bot.AccountLoader;
import bot.IRCBot;
import bot.TriggerLoader;
import trigger.VariableTrigger;

/**
 * @author Philip
 *
 */
public class ReloadAccountsTrigger extends VariableTrigger {
	private IRCBot ircBot;

	public ReloadAccountsTrigger(String trigger, String response, IRCBot ircBot) {
		super(trigger, response, 1);
		this.ircBot = ircBot;
	}

	public String response(int i) {
		AccountLoader al = new AccountLoader("accounts.txt");
		ircBot.removeAllAccounts();
		ircBot.load(al);
		return "Gjort! :>";
	}
}
